<!DOCTYPE html>
<html>
<head>
	<title>测试页面</title>
	<script type="text/javascript">
	this.ctx="";
	</script>
	<script type="text/javascript" src="/bower_components/requirejs/require.js" 
	data-main="/static/app" data-bootstrap-modules="['test/TestModule']">
	</script>	
	<script type="text/javascript" src="/bower_components/jquery/dist/jquery.js"></script>
	<script type="text/javascript">
			$(function() {
				$('#addStudent').click(function(event) {
					$('#div1').toggle();
				});
			});
			$(function() {
				$('#return').click(function(event) {
					$('#div1').toggle();
				});
			});
			$(function() {
				$('#updateStudent').click(function(event) {
					$('#div2').toggle();
				});
			});
			$(function() {
				$('#close').click(function(event) {
					$('#div2').toggle();
				});
			});
			$(function() {
				$('#addClass').click(function(event) {
					$('#div3').toggle();
				});
			});
			$(function() {
				$('#closeCla').click(function(event) {
					$('#div3').toggle();
				});
			});
			$(function() {
				$('#updClass').click(function(event) {
					$('#div4').toggle();
				});
			});
			$(function() {
				$('#closeClass').click(function(event) {
					$('#div4').toggle();
				});
			});
	</script>
	<link rel="stylesheet" type="text/css" href="/static/css/controls.css">
	<style type="text/css">
		[ng-cloak]{
			display: none;
		}
		.divcss{
			display: none;
			width: 400px;
			height: 300px;
			border:1px solid #000
		}
		.divcss2{
			display: none;
			width: 400px;
			height: 300px;
			border:1px solid #000
		}
		.divcss3{
			display: none;
			width: 400px;
			height: 200px;
			border:1px solid #000
		}
		.divcss4{
			display: none;
			width: 400px;
			height: 200px;
			border:1px solid #000
		}
	</style>	
</head>
<body  ng-controller="Controller1">
	<div>
	<button id="addStudent">添加学生信息</button>
	<button id="updateStudent">更新学生信息</button>
	<button id="addClass">添加班级信息</button>
	<button id="updClass">修改班级信息</button>
	</div>
	<g-data-source source-name="student" url="/business/queryStuAndClass"  page ="true"  allow-auto-load="true" showExport="true">
	</g-data-source>

		<hr>
		搜索栏:
		<input type="text" ng-model="search.studentName">
		<input type="text" ng-model="search.studentNm">
		<button ng-click="searchStudent()">搜索</button>
		<button ng-click="lookDtail()">查看详细</button>
		<button ng-click="rootExcel()">数据导出</button>
		<hr>
		<!-- <p ng-repeat="student in students">
			学生姓名:{{student.studentName}}
			学生编号:{{student.studentNm}}
		</p>	 -->
		<br> 
		<g-pagination-navi source-name="student"></g-pagination-navi>
		<g-pagination-size source-name="student"></g-pagination-size>
		<g-data-grid data-source-name="student" data-on-load-success="studentLoadSuccess(grid,source)">
			<g-checkbox-column></g-checkbox-column>
			<g-column >
				<g-column-tmpl>
					<button ng-click="grid.actions.removeStudent(row)">删除</button> 
					<!-- <g-action-remove>删除</g-action-remove> -->
				</g-column-tmpl>
			</g-column>
			<g-column data="studentName"  align="center">姓名</g-column>
			<g-column data="studentNm"    align="center">编号</g-column>
			<g-column data="classname"    align="center">班级</g-column>
		</g-data-grid>
		
			<br>	<br>	<br>
		<div class="divcss" id="div1">
		<h2>添加学生信息</h2>
		学生ID:&nbsp;&nbsp;&nbsp;<input type="text" ng-model="student.studentId">	<br>	<br>
		所属班级:&nbsp;&nbsp;<input type="text" ng-model="student.classid"><br>	<br>
		学生姓名:&nbsp;&nbsp;<input type="text" ng-model="student.studentName" name="studentName"><br>	<br>
		学生编号:&nbsp;&nbsp;<input type="text" ng-model="student.studentNm"   name="studentNm"><br>	<br>
		学生年龄:&nbsp;&nbsp;<input type="text" ng-model="student.age"><br>	<br>
		<button ng-click="createStudent()">保存信息</button>
		<button id="return">关闭</button>
		</div>

		<div class="divcss2" id="div2">
		<h2>添加学生信息</h2>
		学生ID:&nbsp;&nbsp;&nbsp;<input type="text" ng-model="student.studentId">	<br>	<br>
		所属班级:&nbsp;&nbsp;<input type="text" ng-model="student.classid"><br>	<br>
		学生姓名:&nbsp;&nbsp;<input type="text" ng-model="student.studentName" name="studentName"><br>	<br>
		学生编号:&nbsp;&nbsp;<input type="text" ng-model="student.studentNm"   name="studentNm"><br>	<br>
		学生年龄:&nbsp;&nbsp;<input type="text" ng-model="student.age"><br>	<br>
		<button ng-click="updateStudent()">更新信息</button>
		<button id="close">关闭</button>
		</div>

		<div class="divcss3" id="div3">
		<h2>添加班级信息</h2>
		班级ID:&nbsp;&nbsp;&nbsp;<input type="text" ng-model="testclass.classId">	<br>	<br>
		班级名称:&nbsp;&nbsp;<input type="text" ng-model="testclass.classname"><br>	<br>
		<button ng-click="addClass()">保存信息</button>
		<button id="closeCla">关闭</button>
		</div>
		
		<div class="divcss4" id="div4">
		<h2>修改班级信息</h2>
		班级ID:&nbsp;&nbsp;&nbsp;<input type="text" ng-model="testclass.classId">	<br>	<br>
		班级名称:&nbsp;&nbsp;<input type="text" ng-model="testclass.classname"><br>	<br>
		<button ng-click="updateClass()">修改信息</button>
		<button id="closeClass">关闭</button>
		</div>
		<div>
		<img src="/static/images/1.jpg">
		</div>
</body>
</html>
